package com.laosg.spring.small.core01;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * <p>description: some thing </p>
 *
 * @author kevin
 * @date 8/16/21
 */
public class BeanFactory {

    private Map<String,BeanDefinition> beanDefinitionMap=new ConcurrentHashMap<String, BeanDefinition>();
    public Object getBean(String name) {
        return beanDefinitionMap.get(name).getBean();
    }
    public void registerBeanDefinition(String name,BeanDefinition beanDefinition) {
        beanDefinitionMap.put(name, beanDefinition);
    }

}
